

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Yozeev.BusinessLogic;

namespace Yozeev.EntityMapper.TicketPrices
{
    public class TicketPriceCfg : IEntityTypeConfiguration<TicketPrice>
    {
        public void Configure(EntityTypeBuilder<TicketPrice> builder)
        {

            builder.ToTable("TicketPrices", YoYoAbpefCoreConsts.SchemaNames.Ticket);



			//builder.Property(a => a.ScheduleId).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			//builder.Property(a => a.Schedule).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.TicketId).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			//builder.Property(a => a.Ticket).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.IsEnabled).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.Sort).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.Price).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.Discount).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64).HasDefaultValue(new decimal(1));
			builder.Property(a => a.RDiscount).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64).HasDefaultValue(new decimal(1));
			builder.Property(a => a.UpperTime).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.LowerTime).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
            builder.Property(a => a.Position).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
            builder.Property(a => a.TicketName).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);



        }
	}
}


